Integrand size = 16, antiderivative size = 88 \[ \int (c+d x)^2 \tanh ^2(e+f x) \, dx=-\frac {(c+d x)^2}{f}+\frac {(c+d x)^3}{3 d}+\frac {2 d (c+d x) \log \left (1+e^{2 (e+f x)}\right )}{f^2}+\frac {d^2 \operatorname {PolyLog}\left (2,-e^{2 (e+f x)}\right )}{f^3}-\frac {(c+d x)^2 \tanh (e+f x)}{f} \]
[Out]
Time = 0.10 (sec) , antiderivative size = 88, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.375, Rules used = {3801, 3799, 2221, 2317, 2438, 32} \[ \int (c+d x)^2 \tanh ^2(e+f x) \, dx=\frac {2 d (c+d x) \log \left (e^{2 (e+f x)}+1\right )}{f^2}-\frac {(c+d x)^2 \tanh (e+f x)}{f}-\frac {(c+d x)^2}{f}+\frac {(c+d x)^3}{3 d}+\frac {d^2 \operatorname {PolyLog}\left (2,-e^{2 (e+f x)}\right )}{f^3} \]
[In]
[Out]
Rule 32
Rule 2221
Rule 2317
Rule 2438
Rule 3799
Rule 3801
Rubi steps \begin{align*} \text {integral}& = -\frac {(c+d x)^2 \tanh (e+f x)}{f}+\frac {(2 d) \int (c+d x) \tanh (e+f x) \, dx}{f}+\int (c+d x)^2 \, dx \\ & = -\frac {(c+d x)^2}{f}+\frac {(c+d x)^3}{3 d}-\frac {(c+d x)^2 \tanh (e+f x)}{f}+\frac {(4 d) \int \frac {e^{2 (e+f x)} (c+d x)}{1+e^{2 (e+f x)}} \, dx}{f} \\ & = -\frac {(c+d x)^2}{f}+\frac {(c+d x)^3}{3 d}+\frac {2 d (c+d x) \log \left (1+e^{2 (e+f x)}\right )}{f^2}-\frac {(c+d x)^2 \tanh (e+f x)}{f}-\frac {\left (2 d^2\right ) \int \log \left (1+e^{2 (e+f x)}\right ) \, dx}{f^2} \\ & = -\frac {(c+d x)^2}{f}+\frac {(c+d x)^3}{3 d}+\frac {2 d (c+d x) \log \left (1+e^{2 (e+f x)}\right )}{f^2}-\frac {(c+d x)^2 \tanh (e+f x)}{f}-\frac {d^2 \text {Subst}\left (\int \frac {\log (1+x)}{x} \, dx,x,e^{2 (e+f x)}\right )}{f^3} \\ & = -\frac {(c+d x)^2}{f}+\frac {(c+d x)^3}{3 d}+\frac {2 d (c+d x) \log \left (1+e^{2 (e+f x)}\right )}{f^2}+\frac {d^2 \operatorname {PolyLog}\left (2,-e^{2 (e+f x)}\right )}{f^3}-\frac {(c+d x)^2 \tanh (e+f x)}{f} \\ \end{align*}
Time = 0.45 (sec) , antiderivative size = 115, normalized size of antiderivative = 1.31 \[ \int (c+d x)^2 \tanh ^2(e+f x) \, dx=c^2 x+c d x^2+\frac {d^2 x^3}{3}+\frac {\frac {2 f (c+d x) \left (f (c+d x)+d \left (1+e^{2 e}\right ) \log \left (1+e^{-2 (e+f x)}\right )\right )}{1+e^{2 e}}-d^2 \operatorname {PolyLog}\left (2,-e^{-2 (e+f x)}\right )}{f^3}-\frac {(c+d x)^2 \text {sech}(e) \text {sech}(e+f x) \sinh (f x)}{f} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(184\) vs. \(2(86)=172\).
Time = 0.28 (sec) , antiderivative size = 185, normalized size of antiderivative = 2.10
method | result | size |
risch | \(\frac {d^{2} x^{3}}{3}+d c \,x^{2}+c^{2} x +\frac {c^{3}}{3 d}+\frac {2 x^{2} d^{2}+4 c d x +2 c^{2}}{f \left (1+{\mathrm e}^{2 f x +2 e}\right )}+\frac {2 d c \ln \left (1+{\mathrm e}^{2 f x +2 e}\right )}{f^{2}}-\frac {4 d c \ln \left ({\mathrm e}^{f x +e}\right )}{f^{2}}-\frac {2 d^{2} x^{2}}{f}-\frac {4 d^{2} e x}{f^{2}}-\frac {2 d^{2} e^{2}}{f^{3}}+\frac {2 d^{2} \ln \left (1+{\mathrm e}^{2 f x +2 e}\right ) x}{f^{2}}+\frac {d^{2} \operatorname {polylog}\left (2, -{\mathrm e}^{2 f x +2 e}\right )}{f^{3}}+\frac {4 d^{2} e \ln \left ({\mathrm e}^{f x +e}\right )}{f^{3}}\) | \(185\) |
[In]
[Out]
Result contains complex when optimal does not.
Time = 0.28 (sec) , antiderivative size = 840, normalized size of antiderivative = 9.55 \[ \int (c+d x)^2 \tanh ^2(e+f x) \, dx=\frac {d^{2} f^{3} x^{3} + 3 \, c d f^{3} x^{2} + 3 \, c^{2} f^{3} x + 6 \, d^{2} e^{2} - 12 \, c d e f + 6 \, c^{2} f^{2} + {\left (d^{2} f^{3} x^{3} + 6 \, d^{2} e^{2} - 12 \, c d e f + 3 \, {\left (c d f^{3} - 2 \, d^{2} f^{2}\right )} x^{2} + 3 \, {\left (c^{2} f^{3} - 4 \, c d f^{2}\right )} x\right )} \cosh \left (f x + e\right )^{2} + 2 \, {\left (d^{2} f^{3} x^{3} + 6 \, d^{2} e^{2} - 12 \, c d e f + 3 \, {\left (c d f^{3} - 2 \, d^{2} f^{2}\right )} x^{2} + 3 \, {\left (c^{2} f^{3} - 4 \, c d f^{2}\right )} x\right )} \cosh \left (f x + e\right ) \sinh \left (f x + e\right ) + {\left (d^{2} f^{3} x^{3} + 6 \, d^{2} e^{2} - 12 \, c d e f + 3 \, {\left (c d f^{3} - 2 \, d^{2} f^{2}\right )} x^{2} + 3 \, {\left (c^{2} f^{3} - 4 \, c d f^{2}\right )} x\right )} \sinh \left (f x + e\right )^{2} + 6 \, {\left (d^{2} \cosh \left (f x + e\right )^{2} + 2 \, d^{2} \cosh \left (f x + e\right ) \sinh \left (f x + e\right ) + d^{2} \sinh \left (f x + e\right )^{2} + d^{2}\right )} {\rm Li}_2\left (i \, \cosh \left (f x + e\right ) + i \, \sinh \left (f x + e\right )\right ) + 6 \, {\left (d^{2} \cosh \left (f x + e\right )^{2} + 2 \, d^{2} \cosh \left (f x + e\right ) \sinh \left (f x + e\right ) + d^{2} \sinh \left (f x + e\right )^{2} + d^{2}\right )} {\rm Li}_2\left (-i \, \cosh \left (f x + e\right ) - i \, \sinh \left (f x + e\right )\right ) - 6 \, {\left (d^{2} e - c d f + {\left (d^{2} e - c d f\right )} \cosh \left (f x + e\right )^{2} + 2 \, {\left (d^{2} e - c d f\right )} \cosh \left (f x + e\right ) \sinh \left (f x + e\right ) + {\left (d^{2} e - c d f\right )} \sinh \left (f x + e\right )^{2}\right )} \log \left (\cosh \left (f x + e\right ) + \sinh \left (f x + e\right ) + i\right ) - 6 \, {\left (d^{2} e - c d f + {\left (d^{2} e - c d f\right )} \cosh \left (f x + e\right )^{2} + 2 \, {\left (d^{2} e - c d f\right )} \cosh \left (f x + e\right ) \sinh \left (f x + e\right ) + {\left (d^{2} e - c d f\right )} \sinh \left (f x + e\right )^{2}\right )} \log \left (\cosh \left (f x + e\right ) + \sinh \left (f x + e\right ) - i\right ) + 6 \, {\left (d^{2} f x + d^{2} e + {\left (d^{2} f x + d^{2} e\right )} \cosh \left (f x + e\right )^{2} + 2 \, {\left (d^{2} f x + d^{2} e\right )} \cosh \left (f x + e\right ) \sinh \left (f x + e\right ) + {\left (d^{2} f x + d^{2} e\right )} \sinh \left (f x + e\right )^{2}\right )} \log \left (i \, \cosh \left (f x + e\right ) + i \, \sinh \left (f x + e\right ) + 1\right ) + 6 \, {\left (d^{2} f x + d^{2} e + {\left (d^{2} f x + d^{2} e\right )} \cosh \left (f x + e\right )^{2} + 2 \, {\left (d^{2} f x + d^{2} e\right )} \cosh \left (f x + e\right ) \sinh \left (f x + e\right ) + {\left (d^{2} f x + d^{2} e\right )} \sinh \left (f x + e\right )^{2}\right )} \log \left (-i \, \cosh \left (f x + e\right ) - i \, \sinh \left (f x + e\right ) + 1\right )}{3 \, {\left (f^{3} \cosh \left (f x + e\right )^{2} + 2 \, f^{3} \cosh \left (f x + e\right ) \sinh \left (f x + e\right ) + f^{3} \sinh \left (f x + e\right )^{2} + f^{3}\right )}} \]
[In]
[Out]
\[ \int (c+d x)^2 \tanh ^2(e+f x) \, dx=\int \left (c + d x\right )^{2} \tanh ^{2}{\left (e + f x \right )}\, dx \]
[In]
[Out]
\[ \int (c+d x)^2 \tanh ^2(e+f x) \, dx=\int { {\left (d x + c\right )}^{2} \tanh \left (f x + e\right )^{2} \,d x } \]
[In]
[Out]
\[ \int (c+d x)^2 \tanh ^2(e+f x) \, dx=\int { {\left (d x + c\right )}^{2} \tanh \left (f x + e\right )^{2} \,d x } \]
[In]
[Out]
Timed out. \[ \int (c+d x)^2 \tanh ^2(e+f x) \, dx=\int {\mathrm {tanh}\left (e+f\,x\right )}^2\,{\left (c+d\,x\right )}^2 \,d x \]
[In]
[Out]